/**
 * 
 */
package com.music.client.member.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Required;

import com.music.client.member.MemberClient;
import com.music.service.members.beans.Member;
import com.music.service.members.constants.Gender;
import com.music.service.members.service.MemberService;

/**
 * @author asanthan
 *
 */
public class MemberClientImpl implements MemberClient {
	private MemberService mMemberService;

	/**
	 * @return the memberService
	 */
	public MemberService getMemberService() {
		return mMemberService;
	}

	/**
	 * @param pMemberService the memberService to set
	 */
	@Required
	public void setMemberService(MemberService pMemberService) {
		mMemberService = pMemberService;
	}

	@Override
	public Member createMember(String pFirstName, String pLastName,
			String pPassword, Date pBirthDate, Gender pGender, String pEmail)
			throws Exception {
		return getMemberService().createMember(pFirstName, pLastName, pPassword, pBirthDate, pGender, pEmail);
	}

	@Override
	public boolean deleteMember(Long pMemberId) {
		return getMemberService().deleteMember(pMemberId);
	}

	@Override
	public Member getMember(Long pMemberId) {
		return getMemberService().getMember(pMemberId);
	}

	@Override
	public Member getMember(String pEmailId) {
		return getMemberService().getMember(pEmailId);
	}

	@Override
	public Member getMember(String pEmailId, boolean pAutoCreate)
			throws Exception {
		return getMemberService().getMember(pEmailId, pAutoCreate);
		
	}

	@Override
	public boolean updateMember(Member pMember) {
		return getMemberService().updateMember(pMember);
	}
	
	
}
